import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import pojo.Movie;
import system.MovieSystem;
import system.impl.MovieSystemImpl;
import tool.LogCat;

import java.util.List;

public class Hadoop1 {

    public static void main(String[] args) {

        //1.输出每部电影的总评分并查询总评分前3名(输出格式：电影编号  总评分)
        MovieSystem movieSystem = new MovieSystemImpl();
        System.out.println("评分最高的前三名");
        List<Movie> topMovies = movieSystem.getTopMovies(3);
        for (Movie movie : topMovies) {
            System.out.println(movie.getName() + " " + movie.getScore());
        }
        LogCat.line();

        //但是怎么用Hadoop分布式计算结合已有代码实现上述功能
    }
}
